package com.testdocs.client.common;

import com.google.gwt.user.client.ui.DecoratedPopupPanel;
import com.google.gwt.user.client.ui.Label;

public class WaitingPopupPanel {
	private DecoratedPopupPanel panel = new DecoratedPopupPanel();
	private Label label = new Label();
	
	public WaitingPopupPanel(String text) {
		panel.setWidget(label);
		label.setText(text);
		panel.setGlassEnabled(true);
		panel.setAnimationEnabled(false);
	}
	
	public void show(String message) {
		panel.show();
		panel.center();
		label.setText(message);
	}
	
	public void show() {
		panel.show();
	}
	
	public void hide() {
		panel.hide();
	}
}
